<?php
global $_W,$_GPC;
include MODULE_ROOT.'/inc/web/__init.php';

$mp = trim($_GPC['mp']);

if($mp == 'school'){
	$title = '小明跑腿-校园助手';
}

if($mp == 'xiaoqu'){
	$title = '小明跑腿-小区助手';
}

$entries = array();
$menu = array();
$menu2 = array();

if(P($mp)){
	$menu = P($mp)->getMenu();
	$menu2 = P($mp)->getMenu2();
}


$entries['menu'] = $menu;
$entries['menu2'] = $menu2;

if(empty($menu)){
	$url = $this->createWebUrl('plugin',array('mp'=>$mp,'mdo'=>'index'));
	header("location:$url");
	exit();
}

include $this->template('plugin_detail');